<?php
$id=$_GET['id'];
$link=mysqli_connect("localhost","root","root","2113");
$sql="SELECT * FROM addnews WHERE id=$id";
$res=mysqli_query($link,$sql);
$one=mysqli_fetch_assoc($res);
$one['addTime']=date("Y-m-d H:i:s",$one['addTime']);
// php获取当前时间
$arr=[];
if(!empty($one)){
	$arr['status'] = 1;
	$arr['info'] = $one;
} else{
	$arr['status'] = 0;
	$arr['info'] = "查询失败";
}

echo json_encode($arr);






?>